package com.ian.service.impl;

import com.ian.dao.PerRegMapper;
import com.ian.pojo.PerReg;
import com.ian.service.PerRegService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 用户注册
 *
 * @Author IanZy
 * @Date 2020/6/16
 */
@Service
public class PerRegServiceImpl implements PerRegService {
    @Autowired
    PerRegMapper perRegMapper;

    @Override
    public PerReg findByTel(String perUserTel) {
        return perRegMapper.findByTel(perUserTel);
    }

    @Override
    public List<String> finAll() {
        return perRegMapper.findAll();
    }

    @Override
    @Transactional
    public int insert(PerReg record) {
        return perRegMapper.insert(record);
    }

    @Override
    @Transactional
    public int updateByTel(PerReg record) {
        return perRegMapper.updateByTel(record);
    }
}
